<!-- Load TinyMCE -->
<script type="text/javascript" src="media/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="media/tiny_mce/config.js"></script>
<script type="text/javascript" src="media/js/jquery.validate.min.js"></script>
<script type="text/javascript">
tiny('detail');
$(function(){
	$("#frmMain").validate({
		rules: 
		{
			"province_name": 
			{ 
				required: true
			}
		},
		messages:
		{
			"province_name": 
			{ 
				required: "กรุณากรอกชื่อจังหวัดค่ะ"
			}			
		}
	});
	$("#horri_menu ul li:eq(3)").addClass("active");		
})
</script>
<h1>การเสริมสร้างเครือข่าย พม.</h1>
<?php include "_menu.php";?>
<form id="frmMain" action="pms/admin/pms/network_save/" method="post" enctype="multipart/form-data" style="margin: 20px 0 0 0;" >
	
<table class="form">
	<tr>
		<th>จังหวัด :</th>
		<td>
			<input type="text" name="province_name" value="<?php echo $network->province_name?>" class="full" />
		</td>
	</tr>
	<tr>
		<th>อำเภอ :</th>
		<td>
			<input type="text" name="district_name" value="<?php echo $network->district_name;?>" class="full" />
		</td>
	</tr>
	<tr>
		<th>ข้อมูล ณ วันที่ :</th>
		<td><input type="text" name="info_date" value="<?php echo ($network->info_date)?DB2Date($network->info_date):DB2Date(@$_GET['date']); ?>" class="text datepicker" /></td>		
	</tr>
	<tr>
		<th>รายละเอียด :</th>
		<td>
			<div><textarea name="detail" class="full tinymce"><?php echo $network->detail?></textarea></div>
		</td>
	</tr>	
	<tr>
		<th></th>
		<td>
			<input id="form-id" type="hidden" name="id" value="<?php echo $network->id;?>">
			
			<?php echo form_referer() ?>
			<?php if(permission('pms', 'update')):?><input type="submit" value="บันทึก" /><?php endif;?>
		</td>
	</tr>
</table>
</form>
